﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Data.Linq;
using System.Data.Linq.Mapping;
using System.Text;
using System.Reflection;
using SDT.DataService;

namespace SDT.DataService.Contexts
{
    /// <summary>
    /// Kết nối database : BDS.Spider
    /// </summary> 
    public class ErrorNewsContext : SystemSpiderDataContext
    {
        [Function(Name = "dbo.sp_WC_ErrorArticle_Insert")]
        public int sp_WC_ErrorArticle_Insert(
                    [Parameter(Name = "ChannelId", DbType = "Int")] System.Nullable<int> channelId,
                    [Parameter(Name = "PageId", DbType = "Int")] System.Nullable<int> pageId,

            [Parameter(Name = "CateSpiderID", DbType = "Int")] System.Nullable<int> spiderCateID,
                    [Parameter(Name = "CreatedDate", DbType = "DateTime")] System.Nullable<System.DateTime> createdDate,
            [Parameter(Name = "ModifyDate", DbType = "DateTime")] System.Nullable<System.DateTime> modifyDate,
                    [Parameter(Name = "Title", DbType = "NVarChar(500)")] string title,
                    [Parameter(Name = "Lead", DbType = "NText")] string lead,
                    [Parameter(Name = "Content", DbType = "NText")] string content,
                    [Parameter(Name = "OriginalUrl", DbType = "NVarChar(400)")] string originalUrl,
                    [Parameter(Name = "ImageDesc", DbType = "NVarChar(500)")] string imageDesc,
                    [Parameter(Name = "Status", DbType = "TinyInt")] System.Nullable<byte> status,
                    [Parameter(Name = "ErrorTitle", DbType = "Bit")] bool errorTitle,
                    [Parameter(Name = "ErrorSummary", DbType = "Bit")] bool errorSummary,
                    [Parameter(Name = "ErrorContent", DbType = "Bit")] bool errorContent,
                    [Parameter(Name = "ErrorDateTime", DbType = "Bit")] bool errorDateTime)
        {
            IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), channelId, pageId, spiderCateID, createdDate, modifyDate, title, lead, content, originalUrl, imageDesc, status, errorTitle, errorSummary, errorContent, errorDateTime);
            return ((int)(result.ReturnValue));
        }

   
    }
}
